//
//  UIImage+MyImageCategory.h
//  JHLNHV2
//
//  Created by macbook-air on 15/5/7.
//  Copyright (c) 2015年 macbook-air. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (KNAddtions)

+ (UIImage *)KNImageWithColor:(UIColor *)color;

+ (UIImage *)KNImageWithColor:(UIColor *)color rect:(CGRect)rect;

+ (UIImage *)KNFirtFrameImageFromVideoUrl:(NSURL *)videoUrl;

+ (UIImage *)KNScaleToSize:(UIImage *)img size:(CGSize)size;

- (UIImage *)KNApplyLightEffect;

- (UIImage *)KNApplyExtraLightEffect;

- (UIImage *)KNApplyDarkEffect;

- (UIImage *)KNApplyTintEffectWithColor:(UIColor *)tintColor;

- (UIImage *)KNApplyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage;

+ (UIImage *)KNCompressImage:(UIImage *)image toMaxFileSize:(NSInteger)maxFileSize;

- (UIImage*)KNImageByScalingAndCroppingForSize:(CGSize)targetSize;

- (UIImage *)KNImageByScalingProportionallyToSize:(CGSize)targetSize;
@end
